package com.ymatou.idcard.api.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.idcard.api.parameter.CheckIdCardByReceiverBean;
import com.ymatou.idcard.api.service.CheckIdCardByReceiverCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;

/**
 * 查询是否要上传身份证接口 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_CheckIdCardByReceiver {

	private static CheckIdCardByReceiverBean checkIdBean;
	private static CheckIdCardByReceiverCall checkIdCall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("查询是否要上传身份证接口");
	}

	@Before
	public void caseUp() {
		checkIdBean = new CheckIdCardByReceiverBean();
		checkIdCall = new CheckIdCardByReceiverCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(checkIdCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_CheckIdCardByReceiver_001() {
		Logger.start(true,"查询是否要上传身份证成功");
		try {
			// TODO 补全case代码
			checkIdBean.setBuyerId("4085");
			checkIdBean.setName("ceshi");
			checkIdBean.setIsCheckLocal(true);
			checkIdBean.setIsNeedPic(true);
			checkIdBean.setMobile("13365959457");

			checkIdCall.setData(checkIdBean);
			checkIdCall.callService();
			Logger.comment("请求报文:" + checkIdCall.getEntityString());
			Logger.comment("返回报文:" + checkIdCall.getReturnData());

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}